home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / intuisup.lha / Intuisup / Library / intuisup.h < prev    next >
C/C++ Source or Header  |  1992-09-14  |  28KB  |  569 lines

  1. /* $Revision Header *** Header built automatically - do not edit! ***********
  2.  *
  3.  *    (C) Copyright 1991 by Torsten Jürgeleit
  4.  *
  5.  *    Name .....: intuisup.h
  6.  *    Created ..: Sunday 22-Dec-91 20:34:40
  7.  *    Revision .: 15
  8.  *
  9.  *    Date        Author                 Comment
  10.  *    =========   ====================   ====================
  11.  *    14-Sep-92   Torsten Jürgeleit      open_window(): new flag to prevent
  12.  *                       adding of inner window offsets
  13.  *    08-Aug-92   Torsten Jürgeleit      new flags
  14.  *                       GADGET_DATA_FLAG_INPUT_CENTER/RIGHT
  15.  *    06-Aug-92   Torsten Jürgeleit      new flag
  16.  *                       GADGET_DATA_FLAG_LISTVIEW_ENTRY_COLOR
  17.  *    28-Jul-92   Torsten Jürgeleit      different centering types for
  18.  *                       requesters
  19.  *    28-Jul-92   Torsten Jürgeleit      open window centered over position
  20.  *                       of mouse pointer
  21.  *    11-Jul-92   Torsten Jürgeleit      use RAWKEY instead of VANILLAKEY
  22.  *                       for gadget hotkeys
  23.  *    01-Jul-92   Torsten Jürgeleit      added support for custom slider
  24.  *                       knob image
  25.  *    21-Jun-92   Torsten Jürgeleit      check for compiler and define
  26.  *                       differences
  27.  *    03-Jun-92   Torsten Jürgeleit      alternate color for menu item texts
  28.  *    14-Apr-92   Torsten Jürgeleit      neq flag GADGET_DATA_FLAG_NO_CLEAR
  29.  *    12-May-92   Torsten Jürgeleit      text colors for IClearWindow()
  30.  *    30-Apr-92   Torsten Jürgeleit      rasters for IClearWindow() and
  31.  *                       requesters
  32.  *    01-Apr-92   Torsten Jürgeleit      changed parameter size of
  33.  *                       IModifyGadget() for new value of
  34.  *                       USE_CURRENT_VALUE (1L << 31)
  35.  *    31-Mar-92   Torsten Jürgeleit      changed USE_CURRENT_VALUE from ~0L
  36.  *                       to (1L << 31)
  37.  *    21-Mar-92   Torsten Jürgeleit      flags for converting numbers with
  38.  *                       string gadgets
  39.  *    22-Dec-91   Torsten Jürgeleit      Created this file!
  40.  *
  41.  ****************************************************************************
  42.  *
  43.  *    Includes, defines, structures, prototypes and pragmas for IntuiSup
  44.  *    library
  45.  *
  46.  * $Revision Header ********************************************************/
  47.  
  48. #ifndef    LIBRARIES_INTUISUP_H
  49. #define    LIBRARIES_INTUISUP_H
  50.  
  51.     /* Includes */
  52.  
  53. #ifndef    EXEC_TYPES_H
  54. #include <exec/types.h>
  55. #endif    /* EXEC_TYPES_H */
  56.  
  57. #ifndef    EXEC_LISTS_H
  58. #include <exec/lists.h>
  59. #endif    /* EXEC_LISTS_H */
  60.  
  61. #ifndef    LIBRARIES_DISKFONT_H
  62. #include <libraries/diskfont.h>
  63. #endif    /* LIBRARIES_DISKFONT_H */
  64.  
  65. #ifndef    INTUITION_INTUITION_H
  66. #include <intuition/intuition.h>
  67. #endif    /* INTUITION_INTUITION_H */
  68.  
  69.     /* Check for compiler and define the differences */
  70.  
  71. #ifdef    AZTEC_C
  72. #ifndef    __VERSION
  73. #define __VERSION 360
  74. #endif    /* __VERSION */
  75. #if    __VERSION < 500
  76. #define __NO_PRAGMAS
  77. #define __NO_PROTOTYPES
  78. #endif    /* __VERSION */
  79. #define C_Args
  80. #endif    /* AZTEC_C */
  81.  
  82. #ifdef    LATTICE
  83. #define    C_Args    __stdargs
  84. #endif    /* LATTICE */
  85.  
  86. #ifdef    DICE
  87. #define    __NO_PRAGMAS
  88. #define    C_Args
  89. #endif    /* DICE */
  90.  
  91.     /* Defines for library */
  92.  
  93. #define IntuiSupName        "intuisup.library"
  94. #define IntuiSupVersion        4L
  95.  
  96.     /* Defines for render */
  97.  
  98. #define RENDER_INFO_FLAG_INNER_WINDOW        (USHORT)(1 << 0)    /* use upper left corner of inner window as location (0,0) */
  99. #define RENDER_INFO_FLAG_BACK_FILL        (USHORT)(1 << 1)    /* fill window back ground with different color */
  100. #define RENDER_INFO_FLAG_AVAIL_FONTS        (USHORT)(1 << 2)    /* scan available fonts and use this list for IAskFont/IOpenFont */
  101.  
  102. #define INTUISUP_DATA_END    (USHORT)0       /* mark end of data arry */
  103.  
  104. #define ISUP_ID        ((ULONG)'I' << 24 | (ULONG)'S' << 16 | 'U' << 8 | 'P')
  105.  
  106.     /* Defines for open window flags */
  107.  
  108. #define OPEN_WINDOW_FLAG_CENTER_SCREEN        (1 << 0)   /* center window on screen */
  109. #define OPEN_WINDOW_FLAG_RENDER_PENS        (1 << 1)   /* use render pens for detail and backfill pen */
  110. #define OPEN_WINDOW_FLAG_CENTER_MOUSE        (1 << 2)   /* center window over current position of mouse pointer */
  111. #define OPEN_WINDOW_FLAG_NO_INNER_WINDOW    (1 << 3)   /* don't add inner window offsets for RENDER_INFO_FLAG_INNER_WINDOW */
  112.  
  113.     /* Defines for clear window flags */
  114.  
  115. #define CLEAR_WINDOW_FLAG_CUSTOM_DRAW_MODE    (1 << 0)   /* don't change draw mode */
  116. #define CLEAR_WINDOW_FLAG_CUSTOM_COLOR        (1 << 1)   /* don't change background color */
  117. #define CLEAR_WINDOW_FLAG_NORMAL_COLOR        (1 << 2)   /* use normal background color */
  118. #define CLEAR_WINDOW_FLAG_USE_RASTER        (1 << 3)   /* use standard raster for window background */
  119. #define CLEAR_WINDOW_FLAG_ABSOLUTE_POS        (1 << 4)   /* don't add window border offset to given upper left position */
  120. #define CLEAR_WINDOW_FLAG_TEXT1_COLOR        (1 << 5)   /* use text color 1 */
  121. #define CLEAR_WINDOW_FLAG_TEXT2_COLOR        (1 << 6)   /* use text color 2 */
  122.  
  123.     /* Defines for texts */
  124.  
  125. #define TEXT_DATA_TYPE_TEXT            (USHORT)1
  126. #define TEXT_DATA_TYPE_NUM_UNSIGNED_DEC        (USHORT)2
  127. #define TEXT_DATA_TYPE_NUM_SIGNED_DEC        (USHORT)3
  128. #define TEXT_DATA_TYPE_NUM_HEX            (USHORT)4
  129. #define TEXT_DATA_TYPE_NUM_BIN            (USHORT)5
  130.  
  131. #define TEXT_DATA_FLAG_BOLD            (USHORT)(1 << 0)
  132. #define TEXT_DATA_FLAG_ITALIC            (USHORT)(1 << 1)
  133. #define TEXT_DATA_FLAG_UNDERLINED        (USHORT)(1 << 2)
  134. #define TEXT_DATA_FLAG_ABSOLUTE_POS        (USHORT)(1 << 3)    /* absolute text pos given - don't add border offsets */
  135. #define TEXT_DATA_FLAG_CENTER            (USHORT)(1 << 4)    /* center text with in window width */
  136. #define TEXT_DATA_FLAG_PLACE_LEFT        (USHORT)(1 << 5)    /* place text left of given left edge */
  137. #define TEXT_DATA_FLAG_COLOR2            (USHORT)(1 << 6)    /* use 2nd text render pen */
  138. #define TEXT_DATA_FLAG_COMPLEMENT        (USHORT)(1 << 7)    /* use complement of front and back pen */
  139. #define TEXT_DATA_FLAG_BACK_FILL        (USHORT)(1 << 8)    /* use draw mode JAM2 to fill text background with ri_BackPen */
  140. #define TEXT_DATA_FLAG_NO_PRINT            (USHORT)(1 << 9)    /* don't print text - only calc width */
  141. #define TEXT_DATA_FLAG_NUM_IDENTIFIER        (USHORT)(1 << 10)    /* convert number with normal (assmebler style) leading identifier `$' or `%' */
  142. #define TEXT_DATA_FLAG_NUM_C_STYLE        (USHORT)(1 << 11)    /* use C style identifier `0x' for hex numbers */
  143. #define TEXT_DATA_FLAG_NUM_LEADING_ZEROES    (USHORT)(1 << 12)    /* convert number includeing leading zeroes */
  144. #define TEXT_DATA_FLAG_NUM_UPPER_CASE        (USHORT)(1 << 13)    /* use upper case characters for hex number */
  145.  
  146. #define CONVERT_FLAG_IDENTIFIER            (USHORT)(1 << 0)    /* convert number with normal (assmebler style) leading identifier `$' or `%' */
  147. #define CONVERT_FLAG_C_STYLE            (USHORT)(1 << 1)    /* use C style identifier `0x' for hex numbers */
  148. #define CONVERT_FLAG_LEADING_ZEROES        (USHORT)(1 << 2)    /* convert number includeing leading zeroes */
  149. #define CONVERT_FLAG_UPPER_CASE            (USHORT)(1 << 3)    /* use upper case characters for hex number */
  150.  
  151.     /* Structures for texts */
  152.  
  153. struct TextData {
  154.     USHORT    td_Type;
  155.     USHORT    td_Flags;
  156.     SHORT    td_LeftEdge;
  157.     SHORT    td_TopEdge;
  158.     BYTE    *td_Text;
  159.     struct TextAttr  *td_TextAttr;
  160. };
  161.     /* Defines for borders */
  162.  
  163. #define BORDER_DATA_TYPE_BOX1_OUT    (USHORT)1
  164. #define BORDER_DATA_TYPE_BOX1_IN    (USHORT)2
  165. #define BORDER_DATA_TYPE_BOX2_OUT    (USHORT)3
  166. #define BORDER_DATA_TYPE_BOX2_IN    (USHORT)4
  167.  
  168.     /* Structures for borders */
  169.  
  170. struct BorderData {
  171.     USHORT    bd_Type;
  172.     SHORT    bd_LeftEdge;
  173.     SHORT    bd_TopEdge;
  174.     USHORT    bd_Width;
  175.     USHORT    bd_Height;
  176. };
  177.     /* Defines for gadgets */
  178.  
  179. #define GADGET_DATA_TYPE_BUTTON        (USHORT)1    /* button gadget */
  180. #define GADGET_DATA_TYPE_CHECK        (USHORT)2    /* checkbox gadget */
  181. #define GADGET_DATA_TYPE_MX        (USHORT)3    /* mutual exclude gadget */
  182. #define GADGET_DATA_TYPE_STRING        (USHORT)4    /* string input gadget */
  183. #define GADGET_DATA_TYPE_INTEGER    (USHORT)5    /* integer input gadget */
  184. #define GADGET_DATA_TYPE_SLIDER        (USHORT)6    /* slider gadget */
  185. #define GADGET_DATA_TYPE_SCROLLER    (USHORT)7    /* scroller gadget */
  186. #define GADGET_DATA_TYPE_CYCLE        (USHORT)8    /* cycle gadget */
  187. #define GADGET_DATA_TYPE_COUNT        (USHORT)9    /* count gadget */
  188. #define GADGET_DATA_TYPE_LISTVIEW    (USHORT)10    /* list view gadget */
  189. #define GADGET_DATA_TYPE_PALETTE    (USHORT)11    /* palette gadget */
  190.  
  191. #define GADGET_DATA_FLAG_DISABLED        (1L << 0)    /* gadget disabled (ghosted) - default enabled */
  192. #define GADGET_DATA_FLAG_NO_BORDER        (1L << 1)    /* no gadget border - default with border */
  193. #define GADGET_DATA_FLAG_HIGH_COMP        (1L << 2)    /* highliting by complement - default by select border */
  194. #define GADGET_DATA_FLAG_ORIENTATION_VERT    (1L << 3)    /* vertical orientation - default horizontal */
  195. #define GADGET_DATA_FLAG_HOTKEY            (1L << 4)    /* hotkey given - default none */
  196. #define GADGET_DATA_FLAG_NO_TEXT_OUTPUT        (1L << 5)    /* no text output, but scan gadget text for hotkey */
  197. #define GADGET_DATA_FLAG_TEXT_LEFT        (1L << 6)    /* place text left of gadget */
  198. #define GADGET_DATA_FLAG_TEXT_RIGHT        (1L << 7)    /* place text right of gadget */
  199. #define GADGET_DATA_FLAG_TEXT_ABOVE        (1L << 8)    /* place text above of gadget */
  200. #define GADGET_DATA_FLAG_TEXT_BELOW        (1L << 9)    /* place text below of gadget */
  201. #define GADGET_DATA_FLAG_TEXT_COLOR2        (1L << 10)    /* use 2nd text render pen for gadget text */
  202. #define GADGET_DATA_FLAG_BUTTON_TOGGLE        (1L << 11)    /* button gadgets: toggle button - default no toggle */
  203. #define GADGET_DATA_FLAG_BUTTON_IMAGE        (1L << 12)    /* button gadgets: render image - default no image */
  204. #define GADGET_DATA_FLAG_INPUT_AUTO_ACTIVATE    (1L << 13)    /* input gadgets: acivate after GADGETUP next or previous input gadget */
  205. #define GADGET_DATA_FLAG_STRING_UNSIGNED_DEC    (1L << 14)    /* string gadgets: input default no pointer to string but an unsigned decimal number */
  206. #define GADGET_DATA_FLAG_STRING_SIGNED_DEC    (1L << 15)    /* string gadgets: input default no pointer to string but an signed decimal number */
  207. #define GADGET_DATA_FLAG_STRING_HEX        (1L << 16)    /* string gadgets: input default no pointer to string but an hex number */
  208. #define GADGET_DATA_FLAG_STRING_BIN        (1L << 17)    /* string gadgets: input default no pointer to string but an binary number */
  209. #define GADGET_DATA_FLAG_SCROLLER_NO_ARROWS    (1L << 18)    /* scroller gadget: no arrows - default with arrows */
  210. #define GADGET_DATA_FLAG_COUNT_SIGNED_DEC    (1L << 19)    /* count gadget: signed dec - default unsigned dec */
  211. #define GADGET_DATA_FLAG_LISTVIEW_READ_ONLY    (1L << 20)    /* list view gadget: read only - default selection enabled */
  212. #define GADGET_DATA_FLAG_LISTVIEW_SHOW_SELECTED (1L << 21)    /* list view gadget: show last selected entry - default no */
  213. #define GADGET_DATA_FLAG_PALETTE_NO_INDICATOR    (1L << 22)    /* palette gadget: no current color indicator - default with indicator */
  214. #define GADGET_DATA_FLAG_PALETTE_INDICATOR_TOP    (1L << 23)    /* palette gadget: place indicator at top - default at left */
  215. #define GADGET_DATA_FLAG_MOVE_POINTER        (1L << 24)    /* move mouse pointer to center of this gadget */
  216. #define GADGET_DATA_FLAG_NO_CLEAR        (1L << 25)    /* don't clear area occupied by this gadget before drawing */
  217. #define GADGET_DATA_FLAG_SLIDER_IMAGE        (1L << 26)    /* kludge to define image for knob of proportional gadget in gd_TextAttr (if text then default TextAttr used) */
  218. #define GADGET_DATA_FLAG_LISTVIEW_ENTRY_COLOR    (1L << 27)    /* list view gadget: if first char of an entry text equals <Ctrl A> ($01) then this char will be skipped and the rest of this entry text will be printed in a different color */
  219. #define GADGET_DATA_FLAG_INPUT_CENTER        (1L << 28)    /* input gadgets: center input string within gadget */
  220. #define GADGET_DATA_FLAG_INPUT_RIGHT        (1L << 29)    /* input gadgets: right justify input string within gadget */
  221.  
  222. #define GADGET_IDCMP_FLAGS_BUTTON    (GADGETUP | RAWKEY)
  223. #define GADGET_IDCMP_FLAGS_CHECK    (GADGETDOWN | RAWKEY)
  224. #define GADGET_IDCMP_FLAGS_MX        (GADGETDOWN | RAWKEY)
  225. #define GADGET_IDCMP_FLAGS_STRING    (GADGETUP | RAWKEY)
  226. #define GADGET_IDCMP_FLAGS_INTEGER    (GADGETUP | RAWKEY)
  227. #define GADGET_IDCMP_FLAGS_SLIDER    (GADGETUP | MOUSEMOVE | RAWKEY)
  228. #define GADGET_IDCMP_FLAGS_SCROLLER    (GADGETDOWN | GADGETUP | MOUSEMOVE | INTUITICKS | RAWKEY)
  229. #define GADGET_IDCMP_FLAGS_CYCLE    (GADGETUP | RAWKEY)
  230. #define GADGET_IDCMP_FLAGS_COUNT    (GADGETDOWN | GADGETUP | MOUSEMOVE | RAWKEY)
  231. #define GADGET_IDCMP_FLAGS_LISTVIEW    (GADGETDOWN | GADGETUP | MOUSEMOVE | INTUITICKS | RAWKEY)
  232. #define GADGET_IDCMP_FLAGS_PALETTE    (GADGETUP | RAWKEY)
  233. #define GADGET_IDCMP_FLAGS_ALL        (GADGETDOWN | GADGETUP | MOUSEMOVE | INTUITICKS | RAWKEY)
  234.  
  235. #define INPUT_AUTO_ACTIVATE(next,prev)    ((((LONG)next) << 16) | prev)    /* macro for (gd_InputActivateNext | gd_InpuActivatePrev) */
  236.  
  237. #define USE_CURRENT_VALUE    (1L << 31)    /* used for set_gadget_attributes() to indicate data for which to use the current value */
  238.  
  239.     /* Structures for gadgets */
  240.  
  241. struct GadgetData {
  242.     ULONG    gd_Type;
  243.     ULONG    gd_Flags;
  244.     USHORT    gd_LeftEdge;
  245.     USHORT    gd_TopEdge;
  246.     USHORT    gd_Width;
  247.     USHORT    gd_Height;
  248.     BYTE    *gd_Text;
  249.     struct TextAttr  *gd_TextAttr;
  250.     union    {
  251.         struct {    /* standard data struct */
  252.         LONG    gd_Data1;
  253.         LONG    gd_Data2;
  254.         VOID    *gd_Data3;
  255.         } gd_Data;
  256.         struct {    /* for button gadgets */
  257.         ULONG    gd_ButtonSelected;        /* selection state for toggle buttons - ZERO = unselected, non ZERO = selected */
  258.         struct Image  *gd_ButtonNormalRender;    /* normal render image */
  259.         struct Image  *gd_ButtonSelectRender;    /* select render image */
  260.         } gd_ButtonData;
  261.         struct {    /* for check gadgets */
  262.         ULONG    gd_CheckSelected;    /* selection state - ZERO = unselected, non ZERO = selected */
  263.         ULONG    gd_CheckPad1;
  264.         ULONG    gd_CheckPad2;
  265.         } gd_CheckData;
  266.         struct {    /* for mutual exclude gadgets */
  267.         ULONG    gd_MXSpacing;        /* pixel spacing between MX gadgets */
  268.         ULONG    gd_MXActiveEntry;    /* num of active entry from text array */
  269.         BYTE    **gd_MXTextArray;    /* ptr to MX text ptr array */
  270.         } gd_MXData;
  271.         struct {    /* for string and integer gadgets */
  272.         ULONG    gd_InputLen;        /* len of input buffer */
  273.         USHORT    gd_InputActivateNext;    /* num of next string/num gadget to activate */
  274.         USHORT    gd_InputActivatePrev;    /* num of previous string/num gadget to activate */
  275.         BYTE    *gd_InputDefault;    /* string: default text [syntax: "text"] */
  276.                         /* integer: default number [syntax: (VOID *)num] */
  277.         } gd_InputData;
  278.         struct {    /* for slider gadgets */
  279.         LONG    gd_SliderMin;        /* min level */
  280.         LONG    gd_SliderMax;        /* max level */
  281.         LONG    gd_SliderLevel;        /* current slider level */
  282.         } gd_SliderData;
  283.         struct {    /* for scroller gadgets */
  284.         ULONG    gd_ScrollerVisible;    /* visible entries */
  285.         ULONG    gd_ScrollerTotal;    /* total entries */
  286.         ULONG    gd_ScrollerTop;        /* current top entry */
  287.         } gd_ScrollerData;
  288.         struct {    /* for cycle gadget */
  289.         ULONG    gd_CycleSpacing;    /* pixel spacing between pop up cycle list entries */
  290.         ULONG    gd_CycleActive;        /* num of current cycle text ptr array entry */
  291.         BYTE    **gd_CycleTextArray;    /* ptr to cycle text ptr array */
  292.         } gd_CycleData;
  293.         struct {    /* for count gadget */
  294.         ULONG    gd_CountMin;        /* min value */
  295.         ULONG    gd_CountMax;        /* max value */
  296.         ULONG    gd_CountValue;    /* current count value */
  297.         } gd_CountData;
  298.         struct {    /* for list view gadget */
  299.         ULONG    gd_ListViewSpacing;    /* pixel spacing between list view entries */
  300.         ULONG    gd_ListViewTop;        /* current top entry */
  301.         struct List  *gd_ListViewList;    /* current list ptr */
  302.         } gd_ListViewData;
  303.         struct {    /* for palette gadget */
  304.         ULONG    gd_PaletteDepth;    /* num of bitplanes for palette */
  305.         ULONG    gd_PaletteColorOffset;    /* first color of palette */
  306.         ULONG    gd_PaletteActiveColor;    /* selected color */
  307.         } gd_PaletteData;
  308.     } gd_SpecialData;
  309. };
  310.     /* Defines for auto request */
  311.  
  312. #define AUTO_REQ_FLAG_BACK_FILL        (USHORT)(1 << 0)
  313. #define AUTO_REQ_FLAG_RENDER_PENS    (USHORT)(1 << 1)
  314. #define AUTO_REQ_FLAG_TEXT_CENTER    (USHORT)(1 << 2)
  315. #define AUTO_REQ_FLAG_TEXT_COLOR2    (USHORT)(1 << 3)
  316. #define AUTO_REQ_FLAG_HOTKEY        (USHORT)(1 << 4)
  317. #define AUTO_REQ_FLAG_BEEP        (USHORT)(1 << 5)
  318. #define AUTO_REQ_FLAG_MOVE_POINTER_POS    (USHORT)(1 << 6)
  319. #define AUTO_REQ_FLAG_MOVE_POINTER_NEG    (USHORT)(1 << 7)
  320. #define AUTO_REQ_FLAG_DRAW_RASTER    (USHORT)(1 << 8)    /* draw raster around text area */
  321. #define AUTO_REQ_FLAG_CENTER_MOUSE    (USHORT)(1 << 9)    /* center last gadget of auto requester over current position of mouse pointer */
  322.  
  323.     /* Defines for requester */
  324.  
  325. #define REQ_DATA_FLAG_BACK_FILL        (1L << 0)
  326. #define REQ_DATA_FLAG_RENDER_PENS    (1L << 1)
  327. #define REQ_DATA_FLAG_INNER_WINDOW    (1L << 2)
  328. #define REQ_DATA_FLAG_AVAIL_FONTS    (1L << 3)
  329. #define REQ_DATA_FLAG_CENTER_SCREEN    (1L << 4)    /* center requester on window's screen */
  330. #define REQ_DATA_FLAG_DRAG_GADGET    (1L << 5)
  331. #define REQ_DATA_FLAG_DEPTH_GADGET    (1L << 6)
  332. #define REQ_DATA_FLAG_DRAW_RASTER    (1L << 7)    /* draw raster between FIRST BORDER and window border - FIRST BORDER will not be used further */
  333. #define REQ_DATA_FLAG_CENTER_WINDOW    (1L << 8)    /* center requester on window */
  334. #define REQ_DATA_FLAG_CENTER_MOUSE    (1L << 9)    /* center requester over current position of mouse pointer */
  335.  
  336.     /* Structures for requester */
  337.  
  338. struct RequesterData {
  339.     SHORT    rd_LeftEdge;
  340.     SHORT    rd_TopEdge;
  341.     SHORT    rd_Width;
  342.     SHORT    rd_Height;
  343.     ULONG    rd_Flags;
  344.     BYTE    *rd_Title;
  345.     struct TextData    *rd_Texts;
  346.     struct BorderData  *rd_Borders;
  347.     struct GadgetData  *rd_Gadgets;
  348. };
  349.     /* Defines for menus */
  350.  
  351. #define MENU_DATA_TYPE_TITLE        (USHORT)1
  352. #define MENU_DATA_TYPE_ITEM        (USHORT)2
  353. #define MENU_DATA_TYPE_SUBITEM        (USHORT)3
  354.  
  355. #define MENU_DATA_FLAG_DISABLED        (USHORT)(1 << 0)    /* disable menu or menu item */
  356. #define MENU_DATA_FLAG_ATTRIBUTE    (USHORT)(1 << 1)    /* attribute menu item */
  357. #define MENU_DATA_FLAG_SELECTED        (USHORT)(1 << 2)    /* selected attribute menu item */
  358. #define MENU_DATA_FLAG_EMPTY_LINE    (USHORT)(1 << 3)    /* insert empty line before this item */
  359. #define MENU_DATA_FLAG_HIGH_NONE    (USHORT)(1 << 4)    /* no highliting */
  360. #define MENU_DATA_FLAG_HIGH_BOX        (USHORT)(1 << 5)    /* highliting with box, otherwise with complement */
  361. #define MENU_DATA_FLAG_TEXT_COLOR2    (USHORT)(1 << 6)    /* alternate color for item text */
  362.  
  363.     /* Structures for menus */
  364.  
  365. struct MenuData {
  366.     USHORT    md_Type;
  367.     USHORT    md_Flags;
  368.     BYTE    *md_Name;
  369.     BYTE    *md_CommandKey;
  370.     ULONG    md_MutualExclude;
  371. };
  372.     /* Defines for text file */
  373.  
  374. #define TEXT_FILE_FLAG_TRIM_LINE        (USHORT)(1 << 0)    /* strip leading and trailing white space */
  375. #define TEXT_FILE_FLAG_SKIP_COMMENTS        (USHORT)(1 << 1)    /* skip C style comments */
  376. #define TEXT_FILE_FLAG_SKIP_EMPTY_LINES        (USHORT)(1 << 2)    /* skip empty lines */
  377. #define TEXT_FILE_FLAG_LINE_CONTINUATION    (USHORT)(1 << 3)    /* continue line with last character '\' in next line */
  378.  
  379. #define TEXT_FILE_STATUS_NORMAL            (SHORT)0
  380. #define TEXT_FILE_STATUS_EOF            (SHORT)1
  381.  
  382. #define TEXT_FILE_ERROR_NO_FILE_DATA        (SHORT)-1
  383. #define TEXT_FILE_ERROR_LINE_TOO_LONG        (SHORT)-2
  384. #define TEXT_FILE_ERROR_NO_COMMENT_END        (SHORT)-3
  385. #define TEXT_FILE_ERROR_READ_FAILED        (SHORT)-4
  386.  
  387.     /* Structures for text file */
  388.  
  389. struct FileData {
  390.     BYTE    *fd_Line;
  391.     USHORT    fd_LineLen;
  392.     USHORT    fd_LineNum;
  393. };
  394.     /* Structures for mouse pointer */
  395.  
  396. struct PointerData {
  397.     UBYTE    pd_Width;
  398.     UBYTE    pd_Height;
  399.     BYTE    pd_XOffset;
  400.     BYTE    pd_YOffset;
  401.     UWORD    *pd_Data;
  402. };
  403.  
  404.     /* Turn off prototypes if compiler does not handle them */
  405.  
  406. #ifdef    __NO_PROTOTYPES
  407. #define    __PARMS(x)    ()
  408. #else
  409. #define    __PARMS(x)    x
  410. #endif    /* __NO_PROTOTYPES */
  411.  
  412.     /* Prototypes */
  413.  
  414. APTR            IGetRenderInfo        __PARMS( (struct Screen  *screen, USHORT flags) );
  415. VOID            IFreeRenderInfo        __PARMS( (APTR ri) );
  416. struct Window        *IOpenWindow        __PARMS( (APTR ri, struct NewWindow  *nw, USHORT flags) );
  417. VOID            IClearWindow        __PARMS( (APTR ri, struct Window  *win, USHORT left_edge, USHORT top_edge, USHORT width, USHORT height, USHORT flags) );
  418. VOID            ICloseWindow        __PARMS( (struct Window  *win, BOOL more_windows) );
  419. struct AvailFontsHeader    *IAvailFonts        __PARMS( (APTR ri) );
  420. struct TextAttr        *IAskFont        __PARMS( (APTR ri, struct TextAttr  *ta) );
  421. struct TextFont        *IOpenFont        __PARMS( (APTR ri, struct TextAttr  *ta) );
  422.  
  423. VOID            IDisplayTexts        __PARMS( (APTR ri, struct Window  *win, struct TextData  *td, SHORT hoffset, SHORT voffset, BYTE **language_text_array) );
  424. USHORT            IPrintText        __PARMS( (APTR ri, struct Window  *win, BYTE *text, USHORT left_edge, USHORT top_edge, USHORT type, USHORT flags, struct TextAttr  *text_attr) );
  425. USHORT            IConvertUnsignedDec    __PARMS( (ULONG num, BYTE *buffer, USHORT flags) );
  426. USHORT            IConvertSignedDec    __PARMS( (LONG num, BYTE *buffer, USHORT flags) );
  427. USHORT            IConvertHex        __PARMS( (ULONG num, BYTE *buffer, USHORT flags) );
  428. USHORT            IConvertBin        __PARMS( (ULONG num, BYTE *buffer, USHORT flags) );
  429.  
  430. VOID            IDisplayBorders        __PARMS( (APTR ri, struct Window  *win, struct BorderData  *bd, SHORT hoffset, SHORT voffset) );
  431. VOID            IDrawBorder        __PARMS( (APTR ri, struct Window  *win, USHORT left_edge, USHORT top_edge, USHORT width, USHORT height, USHORT type) );
  432.  
  433. APTR            ICreateGadgets        __PARMS( (APTR ri, struct GadgetData  *gd, SHORT hoffset, SHORT voffset, BYTE **language_text_array) );
  434. VOID            IFreeGadgets        __PARMS( (APTR gl) );
  435. VOID            IDisplayGadgets        __PARMS( (struct Window  *win, APTR gl) );
  436. VOID            IRefreshGadgets        __PARMS( (APTR gl) );
  437. VOID            IModifyGadget        __PARMS( (APTR gl, USHORT data_entry, LONG left_edge, LONG top_edge, ULONG width, ULONG height) );
  438. ULONG            ISetGadgetAttributes    __PARMS( (APTR gl, USHORT data_entry, ULONG flag_mask, ULONG flag_bits, ULONG data1, ULONG data2, VOID *data3) );
  439. VOID            IActivateInputGadget    __PARMS( (APTR gl, USHORT data_entry) );
  440. struct Gadget        *IGadgetAddress        __PARMS( (APTR gl, USHORT data_entry) );
  441. struct Window        *IRemoveGadgets        __PARMS( (APTR gl) );
  442. struct IntuiMessage    *IGetMsg        __PARMS( (struct MsgPort  *uport) );
  443. VOID            IReplyMsg        __PARMS( (struct IntuiMessage  *imsg) );
  444. UBYTE            IConvertRawKeyToASCII    __PARMS( (struct IntuiMessage  *imsg) );
  445.  
  446. BOOL            IAutoRequest        __PARMS( (struct Window  *req_win, BYTE *title, BYTE *body_text, BYTE *pos_text, BYTE *neg_text, LONG pos_idcmp_flags, LONG neg_idcmp_flags, USHORT req_flags, BYTE **language_text_array) );
  447. APTR            IDisplayRequester    __PARMS( (struct Window  *req_win, struct RequesterData  *rd, BYTE **language_text_array) );
  448. VOID            IRemoveRequester    __PARMS( (APTR rl) );
  449.  
  450. APTR            ICreateMenu        __PARMS( (APTR ri, struct Window  *win, struct MenuData  *md, struct TextAttr  *ta, BYTE **language_text_array) );
  451. VOID            IAttachMenu        __PARMS( (struct Window  *win, APTR ml) );
  452. struct MenuItem     *IMenuItemAddress    __PARMS( (APTR ml, USHORT menu_num) );
  453. struct Window       *IRemoveMenu        __PARMS( (APTR ml) );
  454. VOID            IFreeMenu        __PARMS( (APTR ml) );
  455.  
  456. struct FileData      *IOpenTextFile        __PARMS( (BYTE *name, USHORT read_buffer_size, USHORT line_buffer_size, USHORT flags) );
  457. SHORT            IReadTextLine        __PARMS( (struct FileData  *fd) );
  458. VOID            ICloseTextFile        __PARMS( (struct FileData  *fd) );
  459.  
  460. BYTE            **IBuildLanguageTextArray    __PARMS( (BYTE *name, USHORT entries) );
  461. BYTE            *IGetLanguageText    __PARMS( (BYTE *text, BYTE **text_array) );
  462. VOID            IFreeLanguageTextArray    __PARMS( (BYTE **text_array) );
  463.  
  464. VOID            IChangeMousePointer    __PARMS( (struct Window  *win, struct PointerData  *pd, BOOL remove_gadgets) );
  465. VOID            IRestoreMousePointer    __PARMS( (struct Window  *win) );
  466. VOID            IMoveMousePointer    __PARMS( (struct Window  *win, SHORT x, SHORT y, BOOL button) );
  467.  
  468.     /* Pragmas */
  469.  
  470. #ifndef    __NO_PRAGMAS
  471. #ifdef    AZTEC_C
  472. #pragma amicall(IntuiSupBase, 0x1e, IGetRenderInfo(a0,d0))
  473. #pragma amicall(IntuiSupBase, 0x24, IFreeRenderInfo(a0))
  474. #pragma amicall(IntuiSupBase, 0x2a, IOpenWindow(a0,a1,d0))
  475. #pragma amicall(IntuiSupBase, 0x30, IClearWindow(a0,a1,d0,d1,d2,d3,d4))
  476. #pragma amicall(IntuiSupBase, 0x36, ICloseWindow(a0,d0))
  477. #pragma amicall(IntuiSupBase, 0x3c, IAvailFonts(a0))
  478. #pragma amicall(IntuiSupBase, 0x42, IAskFont(a0,a1))
  479. #pragma amicall(IntuiSupBase, 0x48, IOpenFont(a0,a1))
  480. #pragma amicall(IntuiSupBase, 0x4e, IDisplayTexts(a0,a1,a2,d0,d1,a3))
  481. #pragma amicall(IntuiSupBase, 0x54, IPrintText(a0,a1,a2,d0,d1,d2,d3,a3))
  482. #pragma amicall(IntuiSupBase, 0x5a, IConvertUnsignedDec(d0,a0,d1))
  483. #pragma amicall(IntuiSupBase, 0x60, IConvertSignedDec(d0,a0,d1))
  484. #pragma amicall(IntuiSupBase, 0x66, IConvertHex(d0,a0,d1))
  485. #pragma amicall(IntuiSupBase, 0x6c, IConvertBin(d0,a0,d1))
  486. #pragma amicall(IntuiSupBase, 0x72, IDisplayBorders(a0,a1,a2,d0,d1))
  487. #pragma amicall(IntuiSupBase, 0x78, IDrawBorder(a0,a1,d0,d1,d2,d3,d4))
  488. #pragma amicall(IntuiSupBase, 0x7e, ICreateGadgets(a0,a1,d0,d1,a2))
  489. #pragma amicall(IntuiSupBase, 0x84, IFreeGadgets(a0))
  490. #pragma amicall(IntuiSupBase, 0x8a, IDisplayGadgets(a0,a1))
  491. #pragma amicall(IntuiSupBase, 0x90, IRefreshGadgets(a0))
  492. #pragma amicall(IntuiSupBase, 0x96, IModifyGadget(a0,d0,d1,d2,d3,d4))
  493. #pragma amicall(IntuiSupBase, 0x9c, ISetGadgetAttributes(a0,d0,d1,d2,d3,d4,a1))
  494. #pragma amicall(IntuiSupBase, 0xa2, IActivateInputGadget(a0,d0))
  495. #pragma amicall(IntuiSupBase, 0xa8, IGadgetAddress(a0,d0))
  496. #pragma amicall(IntuiSupBase, 0xae, IRemoveGadgets(a0))
  497. #pragma amicall(IntuiSupBase, 0xb4, IGetMsg(a0))
  498. #pragma amicall(IntuiSupBase, 0xba, IReplyMsg(a0))
  499. #pragma amicall(IntuiSupBase, 0xc0, IAutoRequest(a0,a1,a2,a3,d0,d1,d2,d3,d4))
  500. #pragma amicall(IntuiSupBase, 0xc6, IDisplayRequester(a0,a1,a2))
  501. #pragma amicall(IntuiSupBase, 0xcc, IRemoveRequester(a0))
  502. #pragma amicall(IntuiSupBase, 0xd2, ICreateMenu(a0,a1,a2,a3,d0))
  503. #pragma amicall(IntuiSupBase, 0xd8, IAttachMenu(a0,a1))
  504. #pragma amicall(IntuiSupBase, 0xde, IMenuItemAddress(a0,d0))
  505. #pragma amicall(IntuiSupBase, 0xe4, IRemoveMenu(a0))
  506. #pragma amicall(IntuiSupBase, 0xea, IFreeMenu(a0))
  507. #pragma amicall(IntuiSupBase, 0xf0, IOpenTextFile(a0,d0,d1,d2))
  508. #pragma amicall(IntuiSupBase, 0xf6, IReadTextLine(a0))
  509. #pragma amicall(IntuiSupBase, 0xfc, ICloseTextFile(a0))
  510. #pragma amicall(IntuiSupBase, 0x102, IBuildLanguageTextArray(a0,d0))
  511. #pragma amicall(IntuiSupBase, 0x108, IGetLanguageText(a0,a1))
  512. #pragma amicall(IntuiSupBase, 0x10e, IFreeLanguageTextArray(a0))
  513. #pragma amicall(IntuiSupBase, 0x114, IChangeMousePointer(a0,a1,d0))
  514. #pragma amicall(IntuiSupBase, 0x11a, IRestoreMousePointer(a0))
  515. #pragma amicall(IntuiSupBase, 0x120, IMoveMousePointer(a0,d0,d1,d2))
  516. #pragma amicall(IntuiSupBase, 0x126, IConvertRawKeyToASCII(a0))
  517. #else    /* AZTEC_C */
  518. #ifdef    LATTICE
  519. #pragma libcall IntuiSupBase IGetRenderInfo 1e 802
  520. #pragma libcall IntuiSupBase IFreeRenderInfo 24 801
  521. #pragma libcall IntuiSupBase IOpenWindow 2a 9803
  522. #pragma libcall IntuiSupBase IClearWindow 30 432109807
  523. #pragma libcall IntuiSupBase ICloseWindow 36 802
  524. #pragma libcall IntuiSupBase IAvailFonts 3c 801
  525. #pragma libcall IntuiSupBase IAskFont 42 9802
  526. #pragma libcall IntuiSupBase IOpenFont 48 9802
  527. #pragma libcall IntuiSupBase IDisplayTexts 4e b10a9806
  528. #pragma libcall IntuiSupBase IPrintText 54 b3210a9808
  529. #pragma libcall IntuiSupBase IConvertUnsignedDec 5a 18003
  530. #pragma libcall IntuiSupBase IConvertSignedDec 60 18003
  531. #pragma libcall IntuiSupBase IConvertHex 66 18003
  532. #pragma libcall IntuiSupBase IConvertBin 6c 18003
  533. #pragma libcall IntuiSupBase IDisplayBorders 72 10a9805
  534. #pragma libcall IntuiSupBase IDrawBorder 78 432109807
  535. #pragma libcall IntuiSupBase ICreateGadgets 7e a109805
  536. #pragma libcall IntuiSupBase IFreeGadgets 84 801
  537. #pragma libcall IntuiSupBase IDisplayGadgets 8a 9802
  538. #pragma libcall IntuiSupBase IRefreshGadgets 90 801
  539. #pragma libcall IntuiSupBase IModifyGadget 96 43210806
  540. #pragma libcall IntuiSupBase ISetGadgetAttributes 9c 943210807
  541. #pragma libcall IntuiSupBase IActivateInputGadget a2 802
  542. #pragma libcall IntuiSupBase IGadgetAddress a8 802
  543. #pragma libcall IntuiSupBase IRemoveGadgets ae 801
  544. #pragma libcall IntuiSupBase IGetMsg b4 801
  545. #pragma libcall IntuiSupBase IReplyMsg ba 801
  546. #pragma libcall IntuiSupBase IAutoRequest c0 43210ba9809
  547. #pragma libcall IntuiSupBase IDisplayRequester c6 a9803
  548. #pragma libcall IntuiSupBase IRemoveRequester cc 801
  549. #pragma libcall IntuiSupBase ICreateMenu d2 ba9805
  550. #pragma libcall IntuiSupBase IAttachMenu d8 9802
  551. #pragma libcall IntuiSupBase IMenuItemAddress de 802
  552. #pragma libcall IntuiSupBase IRemoveMenu e4 801
  553. #pragma libcall IntuiSupBase IFreeMenu ea 801
  554. #pragma libcall IntuiSupBase IOpenTextFile f0 210804
  555. #pragma libcall IntuiSupBase IReadTextLine f6 801
  556. #pragma libcall IntuiSupBase ICloseTextFile fc 801
  557. #pragma libcall IntuiSupBase IBuildLanguageTextArray 102 802
  558. #pragma libcall IntuiSupBase IGetLanguageText 108 9802
  559. #pragma libcall IntuiSupBase IFreeLanguageTextArray 10e 801
  560. #pragma libcall IntuiSupBase IChangeMousePointer 114 9803
  561. #pragma libcall IntuiSupBase IRestoreMousePointer 11a 801
  562. #pragma libcall IntuiSupBase IMoveMousePointer 120 210804
  563. #pragma libcall IntuiSupBase IConvertRawKeyToASCII 126 801
  564. #endif    /* LATTICE */
  565. #endif    /* AZTEC_C */
  566. #endif    /* __NO_PRAGMAS */
  567.  
  568. #endif    /* LIBRARIES_INTUISUP_H */
  569.